using MediatR;
using RBAC.ErrorCode;
using RBAC.Read.Api.Application.Dto.ERP.SalesManagement.H;

namespace RBAC.Read.Api.Application.Command.ERP.SalesManagement.H
{
    /// <summary>
    /// 销售订单 KPI 查询（按最近7/30/365天分组）
    /// </summary>
    public class GetSalesOrderKpiCommand : IRequest<APIResult<GetSalesOrderKpiDto>>
    {
        /// <summary>
        /// 时间范围: 7/30/365（天）
        /// </summary>
        public int Days { get; set; } = 7;

        /// <summary>
        /// 分组粒度: day/month（默认 day）。当天数很大时，建议 month
        /// </summary>
        public string GroupBy { get; set; } = "day";
    }
}
